package com.yao.yaoojbackendserviceclient.service;

import com.yao.yaoojbackendmodel.model.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 判题服务
 * 将判题相关代码整合到服务里，后面将该功能抽象成一个微服务
 */

@FeignClient(name = "yaooj-banckend-judge-service", path = "/api/judge/inner")
public interface JudgeFeignClient {

    //judgeService.doJudge(questionSubmitId)

    /**
     * 判题
     * @param questionSubmitId
     * @return
     */
    @PostMapping("/do")
    QuestionSubmit doJudge(@RequestParam("questionSubmitId") Long questionSubmitId);
}
